import { useMainStore } from '@/stores'

// 使用主store的组合式函数
export function useStore() {
  const store = useMainStore()
  
  return {
    // 状态
    ...store.$state,
    
    // Getters
    fullConfig: store.fullConfig,
    isDarkMode: store.isDarkMode,
    isZenMode: store.isZenMode,
    isAiEnabled: store.isAiEnabled,
    
    // Actions
    setIsHandleLocalFile: store.setIsHandleLocalFile,
    setLocalConfig: store.setLocalConfig,
    setActiveSidebar: store.setActiveSidebar,
    setIsOutlineEdit: store.setIsOutlineEdit,
    setIsReadonly: store.setIsReadonly,
    setIsSourceCodeEdit: store.setIsSourceCodeEdit,
    setExtraTextOnExport: store.setExtraTextOnExport,
    setIsDragOutlineTreeNode: store.setIsDragOutlineTreeNode,
    setExtendThemeGroupList: store.setExtendThemeGroupList,
    setBgList: store.setBgList,
    toggleDarkMode: store.toggleDarkMode,
    toggleZenMode: store.toggleZenMode,
    toggleAi: store.toggleAi
  }
}

// 直接导出store实例的函数
export { useMainStore }